﻿<UserControl x:Class="MIRIADemo.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:y="clr-namespace:MIRIADemo"
    xmlns:miria="clr-namespace:MIRIA.UIKit;assembly=MIRIA"
    xmlns:kinect="clr-namespace:MIRIA.Interaction.NiteKinect;assembly=MIRIA"
    xmlns:mainmenu="clr-namespace:MIRIADemo.Pages.MainMenu"
    mc:Ignorable="d" Loaded="UserControl_Loaded"
    d:DesignHeight="580" d:DesignWidth="900">

    <Grid x:Name="LayoutRoot" Background="Black" Height="520">

        <Canvas x:Name="MainPanel" Width="840" Height="420">

            <Canvas x:Name="ColumnTopRight" Width="840" Height="420" VerticalAlignment="Bottom">

                <mainmenu:MiriaButton x:Name="ButtonMiria" Tapped="ButtonMiria_Tapped" HomeLocation="0,0" y:MainPage.Hookable="True" />

                <miria:TButton Tapped="TButton_Tapped" HomeLocation="0,210" Width="200" Height="200" Margin="5,5" y:MainPage.Hookable="True">
                    <Border CornerRadius="20" Background="Purple" BorderBrush="White" BorderThickness="1"></Border>
                </miria:TButton>

                <miria:TButton x:Name="FlipoutButton" Tapped="FlipoutButton_Tapped" HomeLocation="210,0" Width="200" Height="200" Margin="5,5" y:MainPage.Hookable="True">
                    <Border CornerRadius="20" Background="Purple" BorderBrush="White" BorderThickness="1"></Border>
                </miria:TButton>


                <miria:TButton x:Name="KinectPlay" IsDragEnabled="False" Opacity="0.45" Tapped="KinectPlay_Tapped" Background="Green" HomeLocation="456,330" Width="35" Height="35"></miria:TButton>
                <miria:TButton x:Name="KinectRecord" IsDragEnabled="False" Opacity="0.65" Tapped="KinectRecord_Tapped" Background="Red" HomeLocation="461,335" Width="35" Height="35"></miria:TButton>


                <miria:TButton x:Name="KinectDemoButton" IsDragEnabled="False" HomeLocation="210,210" Width="410" Height="200" Margin="5,5" y:MainPage.Hookable="True">
                    <Border CornerRadius="5" Background="Transparent" BorderBrush="#333333" BorderThickness="1">

                        <Canvas  Width="1160" Height="560">
                            <Canvas.RenderTransform>
                                <ScaleTransform ScaleX="0.35" ScaleY="0.35"></ScaleTransform>
                            </Canvas.RenderTransform>     
                            <Border Width="1160" Height="280" Background="#888888" Opacity="0.0"></Border>
                            <Border Width="1160" Height="280" Canvas.Top="280" Opacity="0.0">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="1.0,1.0" ColorInterpolationMode="ScRgbLinearInterpolation" StartPoint="0.5,-1.0">
                                        <GradientStop Color="#00ff00" Offset="0.4"></GradientStop>
                                        <GradientStop Color="#ee99ff" Offset="1.0"></GradientStop>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <kinect:UserSkelton x:Name="Kinect" Canvas.Left="180">

                            </kinect:UserSkelton>
                            <TextBlock x:Name="KinectRecorderStatus" FontSize="28" FontFamily="Georgia" Canvas.Left="50" Canvas.Top="50" Foreground="White"></TextBlock>
                        </Canvas>

                    </Border>
                </miria:TButton>

                <mainmenu:X10HALButton x:Name="HalButton" Tapped="HalButton_Tapped" HomeLocation="420,0" y:MainPage.Hookable="True" />

                <!--miria:TButton Canvas.Left="420" Canvas.Top="210" Width="200" Height="200" Margin="5,5" y:MainPage.Hookable="True">
                    <Border MouseLeftButtonUp="Border_MouseLeftButtonUp" CornerRadius="10" Background="Purple" BorderBrush="White" BorderThickness="1"></Border>
                </miria:TButton-->
                <miria:TButton x:Name="FlipinButton" Tapped="FlipinButton_Tapped" HomeLocation="630,0" Canvas.Top="0" Width="200" Height="200" Margin="5,5" y:MainPage.Hookable="True">
                    <Border CornerRadius="20" Background="Purple" BorderBrush="White" BorderThickness="1"></Border>
                </miria:TButton>


                <mainmenu:MIGButton x:Name="ButtonMig" Tapped="ButtonMig_Tapped" HomeLocation="630,210" y:MainPage.Hookable="True" />

            </Canvas>


        </Canvas>

        <Border x:Name="ScrollTextContainer" Height="26" Background="Transparent" Opacity="0.85" CornerRadius="10" VerticalAlignment="Bottom" Margin="15">
            <Grid x:Name="ScrollText" Width="840" Margin="0,0,0,0">
                <TextBlock Foreground="White" FontSize="22" FontFamily="Arial" HorizontalAlignment="Center">hi there! =)</TextBlock>
                <TextBlock Foreground="White" FontSize="22" FontFamily="Arial" HorizontalAlignment="Center">...wondering how this animation has been made?</TextBlock>
                <TextBlock Foreground="White" FontSize="22" FontFamily="Arial" HorizontalAlignment="Center">this animation was recorded 'live' with a kinect controller</TextBlock>
                <TextBlock Foreground="White" FontSize="22" FontFamily="Arial" HorizontalAlignment="Center">and this page is a demo showing some cool features of MIRIA SDK</TextBlock>
                <TextBlock Foreground="White" FontSize="22" FontFamily="Arial" HorizontalAlignment="Center">MIRIA SDK works with siverlight and windows phone 7</TextBlock>
                <TextBlock Foreground="White" FontSize="22" FontFamily="Arial" HorizontalAlignment="Center">MIRIA SDK includes gestures recognition, ui controls, c# animation helpers</TextBlock>
                <TextBlock Foreground="White" FontSize="22" FontFamily="Arial" HorizontalAlignment="Center">MIRIA SDK UIKit controls support input from mouse, multitouch... and...</TextBlock>
                <TextBlock Foreground="White" FontSize="22" FontFamily="Arial" HorizontalAlignment="Center">...through MIG even input from kinect, wii remote and tuio surfaces!</TextBlock>
                <TextBlock Foreground="White" FontSize="22" FontFamily="Arial" HorizontalAlignment="Center">so, try it out now! download and install MIG, connect your kinect</TextBlock>
                <TextBlock Foreground="White" FontSize="22" FontFamily="Arial" HorizontalAlignment="Center">then start recording your own kinect animation by tapping over the red box!</TextBlock>
                <TextBlock Foreground="White" FontSize="22" FontFamily="Arial" HorizontalAlignment="Center"></TextBlock>
            </Grid>
        </Border>

    </Grid>
</UserControl>
